home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / concepts / objects < prev    next >
Text File  |  2001-04-23  |  1KB  |  46 lines

  1. CONCEPT
  2.         objects
  3.  
  4. LAST UPDATED
  5.         never
  6.  
  7. DESCRIPTION
  8.         An object consists of a collection of functions (also called
  9.         'methods') and data (variables) on which the functions operate.
  10.         The only way to manipulate the data contained in an object is
  11.         via one of the functions defined by the object.
  12.  
  13.         Every single thing in a mud is an object.  Rooms are objects.
  14.         Weapons are objects.  Even your character is an object (a special
  15.         kind of object called "interactive" but still an object in most
  16.         every respect).  Each object (except possibly virtual objects) in
  17.         the mud is associated with some file written in LPC (in the mud's
  18.         directory structure) that describes how the object is to interact
  19.         with the gamedriver and the rest of the objects in the mud.
  20.  
  21.         Since 3.2.1@94, objects can have more than 256 global variables.
  22.         Since 3.2.1@117, inherited functions may be specified by
  23.         wildcards '*' and '?'. Example:
  24.  
  25.           inherit "foo";
  26.           inherit "bar";
  27.           inherit "baz";
  28.           inherit "ball";
  29.  
  30.           reset() {
  31.             "ba?"::reset();
  32.             // calls bar::reset() and baz::reset()
  33.  
  34.             "ba*"::reset();
  35.             // calls bar::reset(), baz::reset() and ball::reset()
  36.  
  37.             "*"::reset();
  38.             // calls every inherited reset() function.
  39.           }
  40.  
  41. AUTHOR
  42.         Someone
  43.  
  44. SEE ALSO
  45.         files(C), inheritance(LPC), create(A), reset(A)
  46.